<?php
include "includes/comunes.php";
if (!function_exists('json_encode')) {
	require_once 'json/jsonwrapper_inner.php';
}



$array = array();
if ($_GET['_name'] == 'cuit')
{

	 if ( $_GET['_value'] == 0 )//usa
	 {
		$array[] = array('0' => 'Sin valores');
		
	  } else
	  {
              
			    $tabla='jurisdicciones';
				$condicion=" JurCuit='".$_GET['_value']."' and JurBaja=0";
				$orden='group by JurDen order by JurDen ';
				$respla=cons_sql($tabla,$condicion,$orden);
                 if(mysql_num_rows($respla)>0){
				 	  while ($reg=  mysql_fetch_array($respla)){
					  $array[] = array($reg['jurId'] => utf8_encode($reg['JurDen']));
					  }
					  }else
					    $array[] = array(0 => "Seleccione Jurisdiccion");

	  }
}  else
{
	$array[] = array('1' => 'Data 1');
	$array[] = array('2' => 'Data 2');	
	$array[] = array('3' => 'Data 3');	
}
echo json_encode( $array );
?>
